Re: [GENERAL] primary key - Mailing list pgsql-general

From Herouth Maoz
Subject Re: [GENERAL] primary key
Date
Msg-id l03110708b21c4949fde6@[147.233.159.109]
Whole thread Raw
In response to primary key  (Andrea Antibo <antibo@mclink.it>)
List pgsql-general
At 16:35 +0200 on 9/9/98, Andrea Antibo wrote:


> CREATE TABLE films (
>        code      CHARACTER(5) CONSTRAINT firstkey PRIMARY KEY,
>        title     CHARACTER VARYING(40) NOT NULL,
>        did      DECIMAL(3) NOT NULL,
>        date_prod DATE,
>        kind     CHAR(10),
>        len       INTERVAL HOUR TO MINUTE     );
>
>
> but I have error near CONSTRAINT.
>
> Maybe this version of postgres can't accept the primary key?

True. No primary keys in 6.2.x. Just create a unique index on the code
field after creating the table (preferably, after loading data, if there is
any).

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma



pgsql-general by date:

Previous
From: Andrea Antibo
Date:
Subject: primary key
Next
From: Sferacarta Software
Date:
Subject: Re: [GENERAL] primary key